//package com.woniu.comment.config;
//
//import com.fasterxml.jackson.core.JsonParser;
//import com.fasterxml.jackson.core.JsonProcessingException;
//import com.fasterxml.jackson.databind.DeserializationContext;
//import com.fasterxml.jackson.databind.JsonDeserializer;
//import org.springframework.stereotype.Component;
//
//import java.io.IOException;
//import java.time.LocalDateTime;
//import java.time.OffsetDateTime;
//import java.time.format.DateTimeFormatter;
//
///**
// * 自定义反序列化器
// */
//@Component
//public class CustomLocalDateTimeDeserializer extends JsonDeserializer<LocalDateTime> {
//    @Override
//    public LocalDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext)
//            throws IOException, JsonProcessingException {
//        String date = jsonParser.getText();
//        // Parse the OffsetDateTime and then convert to LocalDateTime
//        OffsetDateTime offsetDateTime = OffsetDateTime.parse(date, DateTimeFormatter.ISO_OFFSET_DATE_TIME);
//        return offsetDateTime.toLocalDateTime();
//    }
//}
